#coding:utf-8
from selenium import webdriver
from bs4 import BeautifulSoup

wd=webdriver.Chrome(r'd:\chromedriver.exe')
wd.get('https://www.51miz.com/sound/')

# Elements = wd.find_elements_by_class_name()
# for element in Elements:
#     print(element)
# element = wd.find_element_by_class_name('SoundBox oh')
wd.implicitly_wait(5)
# html=wd.page_source
# soup = BeautifulSoup(open("html"))
# soup = BeautifulSoup(html,'html.parser')
res = wd.find_elements_by_xpath('//div[@class="SoundPlayer"]')

for re in res:
    # print(re)
    print(re.get_attribute('src'))
# for link in soup.find_all('SoundBox oh '):
#     print(link.get('src'))
# print(soup.prettify())
# # elements = wd.find_elements_by_('SoundBox oh')
# element= wd.find_element_by_class_name('picList')
# #elements = wd.find_elements_by_class_name('SoundBox oh')
# print(element)
# # 取出列表中的每个 WebElement对象，打印出其text属性的值
# # text属性就是该 WebElement对象对应的元素在网页中的文本内容
# soun =element.find_elements_by_class_name('SoundPlayer')
# for s in soun:
#     print(s.text)




# print(element.find_element_by_class_name('SoundBox oh'))